package com.basketball.repository;

import com.basketball.entity.Player;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface PlayerRepository extends JpaRepository<Player, Long> {
    @Query("select c from player c where c.state=:state")
    List<Player> getByState(@Param("state") String state);
    @Query("select c from player c where c.sec=:sec")
    Player getBySec(String sec);
}
